In the current packet-switched network, due to the service processing needs, the system first needs to identify unicast and multicast attributes of the messages, then internally replicate the multicast messages, manage the unicast and multicast messages, schedule to dequeue the messages in accordance with the rules set by the users, and finally embody all the editing situations of the messages at the exit of the system. Before continuing the analysis, it is necessary to mention that in the variable-length packet-switched network, the packet fragmentation technique can effectively reduce the data delay and jitter and improve the cache utilization, and it is an important mechanism for caching and managing the messages in the current packet-switched network processing device. Its implementation mechanism is to divide the entire cache space into n memory units in accordance with a fixed size, whenever there is a message input, allocate a cache space according to the size of the message, and for a message equal to or less than one memory unit, directly allocate one unit, and for a longer message, it may need to allocate multiple memory units, meanwhile it needs to record that so many memory units belong to the same message, and in design, generally a linked list is used to manage. Thus for the entire cache space, the linked list is used to allocate the cache space when there is packet input and to reclaim the cache space when there is packet output.
Correspondingly, for message output scheduling management, there is a mechanism-descriptor management corresponding to the cache management. Its role is to generate a descriptor for each message already saved in the cache, and said descriptor records the pointer of said message in the cache space. Corresponding to the cache space of the packet entity, the descriptor is saved in the node space, and also the linked list is used to manage. Each descriptor occupies one node, and is allocated with one node during the enqueue and the one node is saved in the corresponding queue according to the user-defined rules, and said node is reclaimed during the dequeue, meanwhile the descriptor is sent to the cache space to manage, and the pointer in said cache space is used to extract the packet entity.
In fact, we can analyze that, assuming the system only support the unicast message service, the memory space of the packet entity can one-by-one correspond to the node space of the descriptor, so that the two sets of management mechanisms can be merged into one set, but the current conflict is the treatment for multicast packets. Since multicast is to replicate the descriptor of the message several times and finally map them to different queues, one multicast message occupies multiple nodes, but there is only one packet entity, thus there is the procedure shown in FIG. 1. For a plurality of nodes for the same multicast message, all the pointers of their descriptors in the cache space point to the memory address of the packet linked list, so as to save and forward the multicast message. It can also be seen that there are two sets of management mechanisms in the prior art, the overheads and managements of the packet and queue of two sets of linked lists have large scale and complicated parts, which significantly increases the cost of maintenance and management.